window.onload=()=>{
  let itemDOM = document.getElementById('items'),
      submitBtn = document.getElementById('submit');
  submitBtn.onclick=(e)=>{
    let item = document.getElementById('item');
    fetch('http://192.168.241.144:8080/todo', {method: 'POST', body: 'item='+item.value}).then(res => { res.text().then(txt => console.log(txt));  });

  };
  fetch('http://192.168.241.144:8080/todo').then(res => { res.text().then(txt => console.log(txt.data)); });
};
